def func(strr):
    digit_number = 0
    space_number = 0
    alpha_number = 0
    else_number  = 0
    for i in strr:
        if i.isdigit():
            digit_number += 1
        elif i.isspace():
            space_number += 1
        elif i.isalpha():
            alpha_number += 1
        else:
            else_number += 1
    return ("数字，空格，字母，其他内容分别有：",
        (digit_number,space_number,alpha_number,else_number))
res = func('sda!@#$%^&1234567dfghj da da ')
print(res)
